package com.annotations;



import com.API.MyFirstAnnotations;
import com.API.Node;

import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;
import java.util.ArrayList;
import java.util.concurrent.CompletableFuture;


@MyFirstAnnotations(description = "Class Annotations")
public class spring  {
    @MyFirstAnnotations(description = "what is Annotations?")
    private String name;

    @MyFirstAnnotations(description = "hahahhhah")
    private String age;

    public spring() {
    }
    public String getName() {
        return name;
    }

    public static void main(String[] args) throws IllegalAccessException, InvocationTargetException, InstantiationException {

        Class<Node> nodeClass = Node.class;
        Constructor<?>[] constructors = nodeClass.getConstructors();
        for (int i = 0; i < constructors.length; i++) {
            Constructor<?> constructor = constructors[i];

            Class<?>[] parameterTypes = constructor.getParameterTypes();

            if (parameterTypes.length == 0) {
                System.out.println("无参构造");
                continue;
            }
            Object o = constructor.newInstance(1);
            System.out.println(o.toString());

        }

    }


}
